package initalize

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"project07_resume_web/src/middlewares"
	"project07_resume_web/src/router"
)

func InitResumeRouter() *gin.Engine {
	routers := gin.Default()
	routers.GET("/health", func(c *gin.Context) {
		c.JSON(http.StatusOK, gin.H{
			"code":    http.StatusOK,
			"success": true,
		})
	})
	routers.Use(middlewares.Cors())
	resumeRouter := routers.Group("/v1")
	router.InitRouters(resumeRouter)

	return routers
}
